<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head >
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>设备列表</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" />
    <script type="text/javascript" th:src="@{/layui/layui.js}"></script>
    <script type="text/javascript" th:src="@{/js/jquery-2.1.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/jquery.serializejson.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/device_list.js}"></script>

    <style>
        body{margin: 10px;}
        .demo-carousel{height: 200px; line-height: 200px; text-align: center;}
    </style>
</head>
<body >

<h3>
    <p align="center">
        <font size="6"> 设备管理后端页面
        </font></p>
</h3>

<div class="layui-row" style="width: 50%;margin-top: 15px">
    <div class="layui-col-xs8">
        <input id="device_ip" type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入设备IP地址" class="layui-input">
    </div>
    <button class="layui-btn layui-col-xs4" id="add_device">添加设备</button>
</div>

<table id="demo" lay-filter="test"></table>

<script type="text/html" id="barDemo">
    <!--<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>-->
    <!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
    {{#  if(d.status==1){ }}
       <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">断开</a>
    {{# } else if(d.status==0) { }}
       <a class="layui-btn layui-btn-xs layui-btn-disabled">断开</a>
    {{#  } }}

</script>


<script id="statusConvert" type="text/html">
    {{#  if(d.status==1){ }}
    在线
    {{# } else if(d.status==0) { }}
    离线
    {{#  } }}
</script>

<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="getCheckData">添加设备</button>
    </div>
</script>

</body>
</html>
